//判断是否登录
function islogins(token){
//	var token = localStorage["token"];
	var json;
	$.ajax({
		type:"post",
		url:"http://localhost:9095/user/isLogin",
		async:false,
		headers:{
			"token":token
		},
		/*beforeSend:function(request){
			  request.setRequestHeader("Authorization", token);
		},*/
		success:function(data){
			console.log(data)
			json = data;
		}
	});
	return json;
}
/**
 * 已登录
 * type: 0:页眉，1:个人资料
 */
function haslogin(resjson,type){
	$("#no-login").hide();
	$("#is-login-one").show();
	$("#is-login-two").show();
	$("#userName").html(resjson.data.email);
	
	if(resjson.data.picImg!=null){
		$("#pic_img").attr("src",resjson.data.picImg);
		
	}
	if(type==1){
		$("#userName1").html(resjson.data.email);
		if(resjson.data.picImg!=null){
			
			$("#pic_img1").attr("src",resjson.data.picImg);
		}
	}
	
}
/**
 * 退出登录
 */
function exit(){
	localStorage.removeItem("token");
	localStorage.removeItem("eduUser");
	localStorage.removeItem("usrId");
	localStorage.removeItem("_in")
	localStorage.removeItem("id")
	window.location.reload();
}

function dd(){
	
}


